package cn.edu.sdjzu.xg.bysj.domain;

import cn.edu.sdjzu.xg.bysj.util.IdService;

import java.io.Serializable;

public final class StudentClass implements Comparable<StudentClass>, Serializable {
	private Integer id;
	private String description;
	private String no;
	private Department department;

	public StudentClass(Integer id, String description, String no, Department department) {
		this.id = id;
		this.description = description;
		this.no = no;
		this.department = department;
	}

	public StudentClass(String description, String no, Department department) {
		this.description = description;
		this.no = no;
		this.department = department;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}


	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	@Override
	public int compareTo(StudentClass other) {
		// no为排序依据
		return this.no.compareTo(other.no);
	}

	@Override
	public String toString() {
		return "StudentClass{" +
				"id=" + id +
				", description='" + description + '\'' +
				", no='" + no + '\'' +
				", department=" + department +
				'}';
	}
}
